#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
#define maxlen 200

char c1[maxlen],c2[maxlen];
int  a1[maxlen],a2[maxlen];
char low[maxlen],up[maxlen];
int main()
{
     while(1)
     {
        gets(low);
        gets(up);
        if(strcmp(low,"0")==0&&strcmp(up,"0")==0) break;
        
        
     
